<?php
$dvds_query = tep_db_query("select distinct p.products_image, p.products_id, p.products_master_status, pd.products_id, pd.products_name from products_description pd, products p where p.products_master_status='1' and p.products_status='1' and pd.products_id=p.products_id order by rand(), p.products_id limit 8");

while ($dvds = tep_db_fetch_array($dvds_query)) {
$dvds_name = ((strlen($dvds['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($dvds['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $dvds['manufacturers_name']);

echo "<div class=\"slide\" style=\"width: 215px;\">\n";
echo "<span class=\"article\">\n";
echo "<div style=\"width: 200px; height: 200px; text-align:center\">\n";
echo "<a href=\"/product_info.php?products_id={$dvds['products_id']} \">\n";
echo "<img class=\"correct-png\" style=\"margin: 10px 0px 0px 0px;\" width=\"131\" height=\"131\" title=\"{$dvds['products_name']} \" alt=\"{$dvds['products_name']} \" src=\"/product_thumb.php?img=data/images/{$dvds['products_image']}&w=131&h=131 \"/></a>\n";
echo "<div style=\"margin: auto; margin-top: 5px; font-weight: bold;\">{$dvds['products_name']}</div>\n";
echo "</div>\n";
echo "</span></div>\n";
}
?>
